IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_ContentTypeAdd]') AND type in (N'P', N'PC'))
	DROP PROCEDURE [dbo].[cms_sp_ContentTypeAdd]
GO
create procedure [dbo].[cms_sp_ContentTypeAdd]
@Id int = null output,
@SiteId int = null,
@SiteGroupId int = null,
@SystemLanguageId int = null,
@ContentTypeName nvarchar(150),
@Description nvarchar(500) = null,
@IsSystemType bit,
@CreatedBy int,
@DateCreated datetime,
@LastUpdatedBy int = null,
@DateLastUpdated datetime = null
as
insert into [dbo].[ContentTypes](
[SiteId],
[SiteGroupId],
[SystemLanguageId],
[ContentTypeName],
[Description],
[IsSystemType],
[CreatedBy],
[DateCreated]
)
values(
@SiteId,
@SiteGroupId,
@SystemLanguageId,
@ContentTypeName,
@Description,
@IsSystemType,
@CreatedBy,
@DateCreated
)
set @Id = SCOPE_IDENTITY()
return @Id


GO

